From: Keir Fraser Date: Wed, 24 Oct 2007 13:35:19 +0000 (+0100) Subject: minios: Make NSEC_TO_USEC/NSEC_TO_SEC macros expression safe. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14841 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=d06d3cfb8d7622c66c59a2454fe9b791374058ec;p=xen.git minios: Make NSEC_TO_USEC/NSEC_TO_SEC macros expression safe. From: Samuel Thibault Signed-off-by: Keir Fraser --- diff --git a/extras/mini-os/include/time.h b/extras/mini-os/include/time.h index 468a8d9173..ab844e8ede 100644 --- a/extras/mini-os/include/time.h +++ b/extras/mini-os/include/time.h @@ -37,8 +37,8 @@ typedef s64 s_time_t; #define MICROSECS(_us) (((s_time_t)(_us)) * 1000UL ) #define Time_Max ((s_time_t) 0x7fffffffffffffffLL) #define FOREVER Time_Max -#define NSEC_TO_USEC(_nsec) (_nsec / 1000UL) -#define NSEC_TO_SEC(_nsec) (_nsec / 1000000000ULL) +#define NSEC_TO_USEC(_nsec) ((_nsec) / 1000UL) +#define NSEC_TO_SEC(_nsec) ((_nsec) / 1000000000ULL) /* wall clock time */ typedef long time_t;